package br.com.canvasForAll.model.services;

import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.inject.Named;

import br.com.canvasForAll.model.entity.Perfil;
import br.com.canvasForAll.model.repository.PerfilRepository;
import br.com.canvasForAll.model.services.interfaces.PerfilService;

@Stateless
@Named("perfilService")
public class PerfilServiceImpl implements PerfilService {

	@EJB private PerfilRepository perfilRepository;
	
	@Override
	public Perfil obterId(Long id) throws Exception {
		return perfilRepository.obterId(id);
	}

	@Override
	public Perfil salvarPerfil(Perfil p) throws Exception {
		return perfilRepository.criar(p);
	}

}
